x=['新用户','老客户']
h1 = df_new['总交易金额（元）'].sum() / df_new.index.size
h2 = df_old['总交易金额（元）'].sum() / df_old.index.size
height =[h1,h2]
plt.bar(x,height,width=0.3)
plt.ylabel('客单价/元')
plt.title('新老客户客单价柱状图')
for a,b in zip(x,height):
    plt.text(a,b,'%.1f'% b,ha='center')
plt.show()